import argparse

from ipex_models.qwen2_vl_chat_xpu import Qwen2VLChatModel


def main(image_path, prompt):
    model = Qwen2VLChatModel(model_name="Qwen/Qwen2-VL-2B-Instruct", local_dir="/models/Qwen/Qwen2-VL-2B-Instruct")
    response = model.chat(image_path, prompt)
    print(response)


if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Qwen2-VL image description")
    parser.add_argument("--image", required=True, help="Path to the image file")
    parser.add_argument("--prompt", required=True, help="Prompt for the model")
    args = parser.parse_args()
    main(args.image, args.prompt)

